using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._TransitFeed
{
    /// <summary>
    /// <para>Features To GTFS Shapes</para>
    /// <para>Creates a  shapes.txt file for a GTFS public transit dataset based on route line representations created by the Generate Shapes Features From GTFS tool.</para>
    /// <para>根据从 GTFS 生成形状要素工具创建的路径线表示，为 GTFS 公共交通数据集创建shapes.txt文件。</para>
    /// </summary>    
    [DisplayName("Features To GTFS Shapes")]
    public class FeaturesToGTFSShapes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FeaturesToGTFSShapes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_shape_lines">
        /// <para>Input Shape Lines</para>
        /// <para>A line feature class representing the GTFS shapes created by running the Generate Shapes Features From GTFS tool. The feature class must contain a shape_id field with values corresponding to the shape_id field values in the other tool inputs.</para>
        /// <para>表示通过运行从 GTFS 生成形状要素工具创建的 GTFS 形状的线要素类。要素类必须包含一个shape_id字段，其值与其他工具输入中的shape_id字段值相对应。</para>
        /// </param>
        /// <param name="_in_shape_stops">
        /// <para>Input Shape Stops</para>
        /// <para><xdoc>
        ///   <para>A point feature class representing the GTFS stops associated with each shape created by running the Generate Shapes Features From GTFS tool. If a transit stop is used by multiple shapes, the stop should be duplicated in this feature class for each shape that uses it.</para>
        ///   <para>The feature class must contain a shape_id field with values corresponding to the shape_id field values in the other tool inputs. It must also contain a stop_id field with values corresponding to those in the shape_id column of the input GTFS stop_times.txt file.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个点要素类，表示与通过运行从 GTFS 工具生成形状要素创建的每个形状相关联的 GTFS 停靠点。如果一个公交停靠点被多个形状使用，则应在此要素类中为使用该停靠点的每个形状复制该停靠点。</para>
        ///   <para>要素类必须包含一个shape_id字段，其值与其他工具输入中的shape_id字段值相对应。它还必须包含一个stop_id字段，其值与输入 GTFS stop_times.txt 文件的 shape_id 列中的值相对应。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_gtfs_trips">
        /// <para>Input Updated GTFS Trips</para>
        /// <para>The updated GTFS trips.txt file created by running the Generate Shapes Features From GTFS tool. This file must have the shape_id column with values corresponding to those in the shape_id fields in the other tool inputs.</para>
        /// <para>通过运行从 GTFS 生成形状要素工具创建的更新的 GTFS trips.txt 文件。此文件必须具有 shape_id 列，其值与其他工具输入的shape_id字段中的值相对应。</para>
        /// </param>
        /// <param name="_in_gtfs_stop_times">
        /// <para>Input GTFS Stop Times</para>
        /// <para>The original stop_times.txt file from the GTFS dataset that was used when running the Generate Shapes Features From GTFS tool.</para>
        /// <para>运行从 GTFS 工具生成形状要素时使用的 GTFS 数据集中的原始 stop_times.txt 文件。</para>
        /// </param>
        /// <param name="_out_gtfs_shapes">
        /// <para>Output GTFS Shapes</para>
        /// <para>The output GTFS shapes.txt file.</para>
        /// <para>输出 GTFS shapes.txt文件。</para>
        /// </param>
        /// <param name="_out_gtfs_stop_times">
        /// <para>Output GTFS Stop Times</para>
        /// <para>The output GTFS stop_times.txt file This file will contain the shape_dist_traveled field with values derived from the new shapes.</para>
        /// <para>输出 GTFS stop_times.txt文件 此文件将包含 shape_dist_traveled 字段，其中包含从新形状派生的值。</para>
        /// </param>
        public FeaturesToGTFSShapes(object _in_shape_lines, object _in_shape_stops, object _in_gtfs_trips, object _in_gtfs_stop_times, object _out_gtfs_shapes, object _out_gtfs_stop_times)
        {
            this._in_shape_lines = _in_shape_lines;
            this._in_shape_stops = _in_shape_stops;
            this._in_gtfs_trips = _in_gtfs_trips;
            this._in_gtfs_stop_times = _in_gtfs_stop_times;
            this._out_gtfs_shapes = _out_gtfs_shapes;
            this._out_gtfs_stop_times = _out_gtfs_stop_times;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Features To GTFS Shapes";

        public override string CallName => "conversion.FeaturesToGTFSShapes";

        public override List<string> AcceptEnvironments => ["randomGenerator"];

        public override object[] ParameterInfo => [_in_shape_lines, _in_shape_stops, _in_gtfs_trips, _in_gtfs_stop_times, _out_gtfs_shapes, _out_gtfs_stop_times, _distance_units.GetGPValue()];

        /// <summary>
        /// <para>Input Shape Lines</para>
        /// <para>A line feature class representing the GTFS shapes created by running the Generate Shapes Features From GTFS tool. The feature class must contain a shape_id field with values corresponding to the shape_id field values in the other tool inputs.</para>
        /// <para>表示通过运行从 GTFS 生成形状要素工具创建的 GTFS 形状的线要素类。要素类必须包含一个shape_id字段，其值与其他工具输入中的shape_id字段值相对应。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Shape Lines")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_shape_lines { get; set; }


        /// <summary>
        /// <para>Input Shape Stops</para>
        /// <para><xdoc>
        ///   <para>A point feature class representing the GTFS stops associated with each shape created by running the Generate Shapes Features From GTFS tool. If a transit stop is used by multiple shapes, the stop should be duplicated in this feature class for each shape that uses it.</para>
        ///   <para>The feature class must contain a shape_id field with values corresponding to the shape_id field values in the other tool inputs. It must also contain a stop_id field with values corresponding to those in the shape_id column of the input GTFS stop_times.txt file.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个点要素类，表示与通过运行从 GTFS 工具生成形状要素创建的每个形状相关联的 GTFS 停靠点。如果一个公交停靠点被多个形状使用，则应在此要素类中为使用该停靠点的每个形状复制该停靠点。</para>
        ///   <para>要素类必须包含一个shape_id字段，其值与其他工具输入中的shape_id字段值相对应。它还必须包含一个stop_id字段，其值与输入 GTFS stop_times.txt 文件的 shape_id 列中的值相对应。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Shape Stops")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_shape_stops { get; set; }


        /// <summary>
        /// <para>Input Updated GTFS Trips</para>
        /// <para>The updated GTFS trips.txt file created by running the Generate Shapes Features From GTFS tool. This file must have the shape_id column with values corresponding to those in the shape_id fields in the other tool inputs.</para>
        /// <para>通过运行从 GTFS 生成形状要素工具创建的更新的 GTFS trips.txt 文件。此文件必须具有 shape_id 列，其值与其他工具输入的shape_id字段中的值相对应。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Updated GTFS Trips")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_gtfs_trips { get; set; }


        /// <summary>
        /// <para>Input GTFS Stop Times</para>
        /// <para>The original stop_times.txt file from the GTFS dataset that was used when running the Generate Shapes Features From GTFS tool.</para>
        /// <para>运行从 GTFS 工具生成形状要素时使用的 GTFS 数据集中的原始 stop_times.txt 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input GTFS Stop Times")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_gtfs_stop_times { get; set; }


        /// <summary>
        /// <para>Output GTFS Shapes</para>
        /// <para>The output GTFS shapes.txt file.</para>
        /// <para>输出 GTFS shapes.txt文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output GTFS Shapes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_gtfs_shapes { get; set; }


        /// <summary>
        /// <para>Output GTFS Stop Times</para>
        /// <para>The output GTFS stop_times.txt file This file will contain the shape_dist_traveled field with values derived from the new shapes.</para>
        /// <para>输出 GTFS stop_times.txt文件 此文件将包含 shape_dist_traveled 字段，其中包含从新形状派生的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output GTFS Stop Times")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_gtfs_stop_times { get; set; }


        /// <summary>
        /// <para>Distance Units</para>
        /// <para><xdoc>
        ///   <para>Specifies the distance units to use when populating the shape_dist_traveled field in the output GTFS files.</para>
        ///   <bulletList>
        ///     <bullet_item>Miles—The unit is miles. This is the default.</bullet_item><para/>
        ///     <bullet_item>Meters—The unit is meters</bullet_item><para/>
        ///     <bullet_item>Kilometers—The unit is kilometers</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在输出 GTFS 文件中填充shape_dist_traveled字段时要使用的距离单位。</para>
        ///   <bulletList>
        ///     <bullet_item>英里—单位为英里。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>米 - 单位为米</bullet_item><para/>
        ///     <bullet_item>千米 - 单位为千米</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _distance_units_value _distance_units { get; set; } = _distance_units_value._MILES;

        public enum _distance_units_value
        {
            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The unit is miles. This is the default.</para>
            /// <para>英里—单位为英里。这是默认设置。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The unit is meters</para>
            /// <para>米 - 单位为米</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The unit is kilometers</para>
            /// <para>千米 - 单位为千米</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

        }

        public FeaturesToGTFSShapes SetEnv(object randomGenerator = null)
        {
            base.SetEnv(randomGenerator: randomGenerator);
            return this;
        }

    }

}